package com.wei.czz.common.vo.game;

import com.wei.czz.common.tool.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.util.CollectionUtils;

import java.util.List;
import java.util.Objects;

/**
 * Created by IntelliJ IDEA.
 *
 * @author wei
 * date: 2023-03-20 22:59:21
 * className: DeleteGamePrizeVo 删除游戏奖品参数类
 * version: 1.0
 * description:
 */
@Getter
@Setter
public class DeleteGamePrizeVo extends BaseEntity {

    /**
     * 游戏主键
     */
    private Long gameId;
    /**
     * 奖品主键列表
     */
    private List<Long> idList;

    /**
     * 校验保存请求参数是否有误
     * @return true-校验拒绝 false-校验通过
     */
    public boolean isParamsFail() {
        return Objects.isNull(gameId) || CollectionUtils.isEmpty(idList);
    }
}
